package com.lp.controller;

import java.util.Random;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SeeController {
	@RequestMapping(value="/push",produces="text/event-stream")
	public @ResponseBody String push(){
		Random random = new Random();
		try {
			Thread.sleep(10000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return "data:Testing 1,2,3-"+random.nextInt()+"\n\n";
	}
}
